package com.ruoyi.project.tool.swagger;

import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.OperatorType;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.domain.SysAttr;
import com.ruoyi.project.system.service.ISysAttrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/mobile")
public class AttrController {

    @Autowired
    private ISysAttrService attrService;

    /**
     * 获取属性列表
     */
    @GetMapping("/attrList")
    @Log(title = "店铺属性", operatorType = OperatorType.MOBILE)
    public AjaxResult list(SysAttr attr)
    {
        List<SysAttr> list = attrService.selectAttrList(attr);
        return AjaxResult.success(list);
    }
}
